package com.heima.wemedia.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.admin.dtos.AdChannel;
import com.heima.model.admin.dtos.ChannelDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

public interface WmChannelService extends IService<WmChannel> {
    /**
     * 查询所有频道
     * @return
     */
    public ResponseResult findALl();

    /**
     * 保存频道，管理员端和自媒体端都要添加
     * @param channel
     * @return
     */
    public ResponseResult saveChannel(@RequestBody WmChannel channel);

    /**
     * 分页查询频道
     * @param dto
     * @return
     */
    public ResponseResult findListWithPage(@RequestBody ChannelDto dto);

    /**
     * 修改频道
     * @param adChannel
     * @return
     */
    public ResponseResult updateChannel(@RequestBody AdChannel adChannel);

    /**
     * 删除频道
     * @param id
     * @return
     */
    public ResponseResult delChannelById(@PathVariable("id") Integer id);
}